/*
* Copyright 2004-2005 mbsx@seznam.cz
* All Rights Reserved.
*/
using System;
using System.Runtime.InteropServices;
using System.Diagnostics;

namespace DeskNotes
{
	/// <summary>
	/// Summary description for WinImports.
	/// </summary>
	public class WinImports
	{
        [DllImport("User32.dll")]
        public static extern Int32 GetSystemMetrics(Int32 nIndex);

		[DllImport("User32.dll")]
		public static extern IntPtr GetForegroundWindow();

		[DllImport("User32.dll")]
		public static extern Int32 GetWindowLong(IntPtr hWnd, Int32 nIndex);

		[DllImport("User32.dll")]
		public static extern Int32 SetWindowLong(IntPtr hWnd, Int32 nIndex, Int32 dwNewLong);
		
		[DllImport("User32.dll")]
		public static extern Boolean SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter,
			Int32 X, Int32 Y, Int32 cx, Int32 cy, UInt32 uFlags );

		[DllImport("User32.dll")]
		public static extern IntPtr GetDesktopWindow();

		[DllImport("User32.dll")]
		public static extern Boolean SetForegroundWindow(IntPtr hWnd);

		[DllImport("User32.dll")]
		public static extern IntPtr SetParent(IntPtr child, IntPtr newParent);

		[DllImport("User32.dll")]
		public static extern Boolean ShowWindow(IntPtr hWnd, Int32 nCmdShow);

		[DllImport("User32.dll")]
			public static extern IntPtr SetActiveWindow(IntPtr hWnd);

		//PlaySound API can be used to play a wav file. long needs to be fixed according to mapping table.
		[DllImport("winmm.dll")]
		public static extern long PlaySound(String lpszName, long hModule, long dwFlags);

		[DllImport("User32.dll")]
		public static extern Boolean MessageBeep( UInt32 beepType);

        [DllImport("Shell32.dll")]
        public static extern IntPtr ShellExecute(IntPtr hwnd, String lpOperation, String lpFile,
            String lpParameters, String lpDirectory, Int32 nShowCmd);
		 
		public static uint Ok				= 0x00000000;
		public static uint IconHand			= 0x00000010;
		public static uint IconQuestion		= 0x00000020;
		public static uint IconExclamation	= 0x00000030;
		public static uint IconAsterisk		= 0x00000040;
		
		public static int HWND_TOP = 0;
		public static int HWND_TOPMOST = -1;
		public static int HWND_NOTOPMOST = -2;

		public static int GWL_STYLE       =   -16;
		public static int GWL_EXSTYLE       =   -20;

		public static int WS_CAPTION = 0x00C00000;
		public static int WS_BORDER =  0x00800000;
		public static int WS_THICKFRAME = 0x00040000;
		public static int WS_VISIBLE = 0x10000000;
		public static int WS_EX_LAYERED = 0x00080000;
		public static int WS_EX_NOACTIVATE = 0x08000000;
		public static int WS_EX_APPWINDOW = 0x00040000;

		public static uint SWP_FRAMECHANGED = 0x0020;
		public static uint SWP_NOSIZE = 0x0001;
		public static uint SWP_NOMOVE = 0x0002;
		public static uint SWP_NOZORDER = 0x0004;
		public static uint SWP_HIDEWINDOW = 0x0080;
		public static uint SWP_NOOWNERZORDER = 0x0200;

		public static int SW_SHOWNOACTIVATE = 4;

        // index values for GetSystemMetrics()
        public static int SM_CXBORDER = 5;
        public static int SM_CXEDGE = 45;
        public static int SM_CXFIXEDFRAME = 7;
        public static int SM_CXFOCUSBORDER = 83;
        public static int SM_CXSIZEFRAME = 32;

	}
}
